﻿//Модель - документы за день
Ext.define('model.DocumentRow', {
    extend: 'Ext.data.Model',
    fields: [
                { name: 'MNN' },
                { name: 'TradeNM' },
                { name: 'Izm' },
                { name: 'Info' },
                { name: 'Count' },
                { name: 'Price' },
                { name: 'ProductInfo' },
                { name: 'Notification.NotificationNumber' },
                { name: 'Notification.iPublishDate' },
                { name: 'Notification.OrderName' },
                { name: 'Notification.MaxPrice' },
                { name: 'Notification.PlacingWay.Name' },
                { name: 'Notification' },
                { name: 'Notification.Order.OrderOrganization.FullName' },
                { name: 'Notification.Order.OrderOrganization.FactualAddress.AddressLine' },
                { name: 'Notification.Order.OrderOrganization.FactualAddress.DictionaryFactualAddressRegion.fullName' },
                { name: 'Notification.NotificationCommission.iP2Date' }    
                
            ],
    idProperty: 'GetFullID'
});

//Хранилище - документы за день
Ext.define('Storage.documentRows', {
    extend: 'Ext.data.Store',
    model: 'model.DocumentRow',
    pageSize: 5,
    
    proxy: new Ext.data.HttpProxy({
        headers: { 'Content-type': 'application/json' },
        reader: { root: 'd' },
        api: { read: '/DefaultPort.ashx/GetDocumentRows' }
        })
});
